package com.hx.vending.service;

import com.hx.vending.bean.Customer;
import com.hx.vending.bean.CustomerRecharge;
import com.hx.vending.util.Msg;
import org.springframework.web.servlet.ModelAndView;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by Administrator on 2018/12/21.
 */
public interface ICustomerService {

    int saveOrUpdate(Customer record);

    Object alipaypayment(Integer customerId,Integer onlineOrderId);

    String notify(HttpServletRequest request);

    String notifyRefund(HttpServletRequest request);

    ModelAndView returnUrl(HttpServletRequest request);

    /**
     * 根据id查询客户信息
     * @param customerId
     * @return
     */
    Msg selectCustomerById(Integer customerId);

    Customer selectByPrimary(Customer customer);

    int insertCustomerRecharge(CustomerRecharge customerRecharge);

    CustomerRecharge selectRechargeByPrimary(CustomerRecharge customerRecharge);

    Msg withdraw(Double amount,Integer userId,Integer type);

    String aliPayExchangeRedirectWeb(String auth_code,String  state);
}
